#include <cstdio>
#include <cmath>
#include <cstring>
#include <queue>

using namespace std;

int node[ 2500001 ], head[ 2500001 ], next[ 2500001 ], e;
double w[ 2500001 ], d[ 50001 ];
int n;

void addedge( int u, int v, double cost )
{
    node[ e ] = v; w[ e ] = cost; next[ e ] = head[ u ]; head[ u ] = e++;
}

void init( )
{
    int i, t, v, p;
    e = 0;
    memset( head, -1, sizeof( head ) );
    for ( i = 1; i <= n; i++ )
    {
        scanf("%d", &t);
        while ( t-- )
        {
            scanf("%d%d", &v, &p);
            if ( p == 100 ) continue;
            addedge( i, v, -log10( ( 100 - p ) / 100.0 ) );
        }
    }
}

queue<int> q;

void work( )
{
    int i, st, ed, u, v;
    double m;
    for ( i = 1; i <= n; i++ ) d[ i ] = 1e15;
    scanf("%d%d%lf", &st, &ed, &m);
    d[ st ] = 0;
    q.push( st );
    while ( !q.empty( ) )
    {
        u = q.front( );
        q.pop( );
        for ( i = head[ u ]; i != -1; i = next[ i ] )
        {
            v = node[ i ];
            if ( d[ v ] > d[ u ] + w[ i ] )
            {
                d[ v ] = d[ u ] + w[ i ];
                q.push( v );
            }
        }
    }
    if ( d[ ed ] == 1e15 )
        puts("IMPOSSIBLE!");
    else
        printf("%.2lf\n", m * ( 1 - pow( 10.0, -d[ ed ] ) ));
}

int main( )
{
    while ( scanf("%d", &n) != EOF )
    {
        init( );
        work( );
    }
    return 0;
}
